package lazy

import (
	"fmt"
)

var mySingleton = &singleton{}

type singleton struct {
	Name    string
	Address string
}

func GetSingleton() *singleton {
	return mySingleton
}

func (s *singleton) getName() string {
	return s.Name
}

func (s *singleton) getAddress() string {
	return s.Address
}

func (s *singleton) SetName(name string) {
	s.Name = name
}

func (s *singleton) SetAddress(address string) {
	s.Address = address
}

func (s *singleton) String() string {
	return fmt.Sprintf("name = %s,address = %s", s.Name, s.Address)
}
